package mybatis.service;

import mybatis.dao.StudentDao;
import mybatis.entity.Student;

import java.util.List;

public class QueryServiceImpl implements QueryService {
    private StudentDao studentDao;

    public StudentDao getStudentDao() {
        return studentDao;
    }

    public void setStudentDao(StudentDao studentDao) {
        this.studentDao = studentDao;
    }

    @Override
    public List<Student> queryStudents() {
        return studentDao.queryStudents();
    }

    @Override
    public Student queryStudent(int id) {
        return studentDao.queryStudent(id);
    }
}
